*************************************************************************
 MagiCMac Sound driver programmers documentation v0.96 from GSXB driver
*************************************************************************
XBIOS Functions list:

Locksound()    XBIOS function 128.
Unlocksound()  XBIOS Function 129.
Soundcmd()     XBIOS Function 130.
Setbuffer()    XBIOS Function 131.
Setmode()      XBIOS Function 132.
Settracks()    XBIOS Function 133.
Setmontracks() XBIOS Function 134.
Setinterrupt() XBIOS Function 135.
Buffoper()     XBIOS Function 136.
Dsptristate()  XBIOS Function 137. Not yet implemented.
Gpio()         XBIOS Function 138. Just used for clock selection.
Devconnect()   XBIOS Function 139.
Sndstatus()    XBIOS Function 140.
Buffptr()      XBIOS Function 141.

Some functions are not 100% compatible with GSXB/MilanBlaster because 
the way under MacOS with sound devices is different.

*************************************************************************
				Locksnd    
*************************************************************************

  Opcode:
       XBIOS 128

  Syntax:
       long Locksnd ( void );

  Description:
          When one intends to use the soundsystem, Locksnd() should be 
          called to prevent other clean applications from using the 
          soundsystem. All cleanly written applications call Locksnd() 
          before attempting to use the soundsystem, but unfortunately 
          there exists some that just plunge ahead.

          So, ALWAYS call Locksnd() before using the sound XBIOS!!!

  Binding:
          move.w  #128,-(sp)
          trap    #14
          addq.l  #2,sp
          
  Return: Locksnd() will return 1 if soundsystem was sucessfully locked, 
          or ESNDLOCKED if it is already locked by another application.

*************************************************************************
				Unlocksnd
*************************************************************************

  Opcode:
       XBIOS 129

  Syntax:
       long Unlocksnd ( void );

  Description:
          When done using the soundsystem, call Unlocksnd() to free the 
          soundsystem. This will make other applications able to use it 
          again.

  Binding:
          move.w  #129,-(sp)
          trap    #14
          addq.l  #2,sp

  Return: Unlocksnd() will return E_OK (0) if the soundsystem was 
          successfully unlocked, or ESNDNOTLOCK if it wasn't locked.

*************************************************************************
				Soundcmd
*************************************************************************

  Opcode:   
       XBIOS 130

 Syntax:
      long Soundcmd ( word Mode, word DATA );

  Description:
          Soundcmd() is the function used to control most of the things 
          relating to PCM sound, like setting DAC/ADC sampling rate, 
          selecting record sources, etc...

  Binding:
          move.w  DATA,-(sp)
          move.w  Mode,-(sp)
          move.w  #130,-(sp)
          trap    #14
          addq.l  #6,sp

-------------------------------------------------------------------------

 Mode 0   Set Left PCM attenuation (DAC)
 Mode 1   Set Right PCM attenuation (DAC)

          These modes sets the attenuation for the DAC's Left/Right 
          channels.

  DATA:   attenuation (0 - 255) If DATA = SND_INQUIRE (-1), the current 
          setting will be returned without change.

  Return: Returns the value actually set, or ENODEV if installed driver 
                does not have PCM sound.

-------------------------------------------------------------------------

 Mode 2 - Set Record Gain Left channel (ADC)
 Mode 3 - Set Record Gain Right channel (ADC

          These two modes set the record gain for the Left and Right ADC 
          channels.

  DATA:   Record Gain (0 - 255). If DATA = SND_INQUIRE (-1), the current 
          setting will be returned without change.

  Return: Returns the value actualy set, or ENODEV if installed
          driver can't do recording.

-------------------------------------------------------------------------

 Mode 4   Enable/disable (unmute/mute) ADC and the Matrix on DAC.

  DATA:   DATA is a bitmask specifying to Enable/Disable. A SET bit 
          enables/unmutes and a CLEARED bit disables/Mutes :

          Bit 0 - ADC
          Bit 1 - Matrix

  Return: Returns the actual setting being done. This call does not 
          return any errors if the hardware driver does not support a 
          channel attempted enabled/disabled.

  Note:   At this time, only ADC is used by the driver, and the driver
          forces bit 1 (Matrix) to enabled always.

--------------------------------------------------------------------------

  Mode 5  Record source select. This mode is used to select a input 
          source for the ADC.

  DATA:   DATA is a bit mask of record sources. If DATA = SND_INQUIRE    
          (-1), no changes are made, and the current settings are 
          returned. Originally, a SET bit will select Soundchip (Aux1 here),
          and a CLEARED bit will select Microphone. Under Mac, the 
          driver select the current input source when the 2 bits are 
          CLEARED and the source 1 when one or two bits are SET.

          Bit 0 - Right record channel source select.
          Bit 1 - Reft record channel source select.

  Return: Returns the actual setting being done. This call does not 
          return any errors if the hardware driver does not support a 
          channel attempted enabled/disabled.

--------------------------------------------------------------------------

 Mode 6   SETPRESCALE. This mode is only valid (that is, it does nothing) 
          until after using Devconnect() to set the prescaler to TT030 
          compatibility mode. When that is done, DATA represents the 
          TT030 compatible prescaler values as follow :

          Name        Value    Meaning
          CCLK_6K       0        Divide by 1280 (6.25 KHz)
          CCLK_12K      1        Divide by  640 (12.5 KHz)
          CCLK_25K      2        Divide by  320 (25 KHz)
          CCLK_50K      3        Divide by  160 (50 KHz)

          If DATA = SND_INQUIRE (-1), the current prescale setting is 
          returned without any changes being done.

  Return: This mode returns the actual setting.

--------------------------------------------------------------------------

 Mode 7   Set Sample rate. This is a MilanBlaster/GSXB only mode, and is 
          is available when bits 2 AND 5 in _SND cookie is SET. If this 
          is true, always use this call to set desired sample rate.

  DATA:   If DATA = SND_INQUIRE (-1), the current sample rate is returned 
          without any changes. Otherwise DATA contains the desired sample 
          rate, between 0 - 65533 Hz.

  NOTE:   This call acutally sets the rate for both the DAC and the ADC.

  Return: Returns the sample rate acutally set for the ADC and the DAC.

--------------------------------------------------------------------------

 Mode 8   Set desired format for 8-bit samples. This is a  
          MilanBlaster/GSXB only mode, and is is available when bits 2 
          AND 5 in _SND cookie is SET. This call is used to change the 
          format on 8-bit samples.
          
  DATA:   If DATA = SND_INQUIRE (-1), the sampleformat currently in use 
          is returned. Otherwise DATA is a bitmask with the following 
          meaning;

          Bit 0 - If set, Signed
          Bit 1 - If set, Unsigned

  Return: The driver always returns 1 (Signed).

--------------------------------------------------------------------------

 Mode 9   Set desired format for 16-bit samples. This is a  
          MilanBlaster/GSXB only mode, and is is available when bits 2 
          AND 5 in _SND cookie is SET. This call is used to change the 
          format on 16-bit samples. 

  DATA:   If DATA = SND_INQUIRE (-1), the sampleformat currently in use 
          is returned. Otherwise DATA is a bitmask with the following 
          meaning;

          Bit 0 - If set, Signed
          Bit 1 - If set, Unsigned
          Bit 2 - If set, Big endian (motorola byte order)
          Bit 3 - If set, Little Endian (Intel byte order)

  Return: The driver always returns 5 (Signed Big endian).

--------------------------------------------------------------------------

 Mode 10  Set desired format for 24-bit samples. This is a  
          MilanBlaster/GSXB only mode, and is is available when bits 2 
          AND 5 in _SND cookie is SET. This call is used to change the 
          format on 24-bit samples. The driver does not support 24-bit 
          samples.

  DATA:   If DATA = SND_INQUIRE (-1), the sampleformat currently in use 
          is returned. Otherwise DATA is a bitmask with the following 
          meaning :

          Bit 0 - If set, Signed
          Bit 1 - If set, Unsigned
          Bit 2 - If set, Big endian (motorola byte order)
          Bit 3 - If set, Little Endian (Intel byte order)

  Return: The driver always returns 0.

--------------------------------------------------------------------------

 Mode 11  Set desired format for 32-bit samples. This is a  
          MilanBlaster/GSXB only mode, and is is available when bits 2 
          AND 5 in _SND cookie is SET. This call is used to change the 
          format on 32-bit samples. The driver does not support 32-bit 
          samples.

  DATA:   If DATA = SND_INQUIRE (-1), the sampleformat currently in use 
          is returned. Otherwise DATA is a bitmask with the following 
          meaning :

          Bit 0 - If set, Signed
          Bit 1 - If set, Unsigned
          Bit 2 - If set, Big endian (motorola byte order)
          Bit 3 - If set, Little Endian (Intel byte order)

  Return: The driver always returns 0.

*************************************************************************
				Setbuffer
*************************************************************************

  Opcode:
       XBIOS 131

  Syntax:
       long Setbuffer ( word REG, void *BEGADDR, void *ENDADDR );

  Description:
          This function is used to set the starting and ending address of 
          the DMA buffer for Playback or Capture. BEGADDR points to the 
          start of the buffer, and ENDADDR points to the first invalid 
          byte in the buffer. If a buffer starts at 0x100 and ends at 
          0x200, BEGADDR would be 0x100, and ENDADDR would be 0x201.

  REG:    This is a value indicating if this call is made to set the 
          playback buffer (DAC) or the capture (ADC) buffer.

          ReG Value    Meaning
             0       Set Playback (DAC) buffer
             1       Set Record (ADC) buffer


  NOTE:   PCM DMA buffers should always be in ST-RAM. So, in order to get 
          the correct memory type for the buffers, use Mxalloc(size, 0).

  Binding:
          pea     ENDADDR
          pea     BEGADDR
          move.w  REG,-(sp)
          move.w  #131,-(sp)
          trap    #14
          lea     12(sp),sp

  Return: Setbuffer() will return E_OK (0) if successful.

*************************************************************************
				Setmode
*************************************************************************

  Opcode:
       XBIOS 132

  Syntax:
       long Setmode( word Mode );

  Description:
          Setmode() function is used to set playback or capture mode.

  Mode:   0 - Set 8-bit  stereo playback, 16-bit stereo capture
          1 - Set 16-bit stereo playback, 16-bit stereo capture
          2 - Set 8-bit  mono playback,   16-bit stereo capture

          When bit 2 AND 5 is set in _SND cookie, the desired playback 
          mode is selected in the low byte of Mode, and the 
          desired capture mode is selected in the high byte. The playback 
          modes from above still apply.

  Mode:   3 - Set 16-bit mono playback,   16-bit stereo capture

  Binding:
          move.w  Mode,-(sp)
          move.w  #132,-(sp)
          trap    #14
          addq.l  #4,sp

  Return: Setmode() will return E_OK (0) if selection is valid.

*************************************************************************
				Settracks
*************************************************************************

  Opcode:
      XBIOS 133

  Syntax:
      long Settracks ( word PLAYTRACKS, word RECTRACKS );

  Description:
          Settracks() select the number (0-3) of record/play tracks.
          Actually the driver uses only one track and clear the others
          tracks.

  Binding:
          move.w  RECTRACKS,-(sp)
          move.w  PLAYTRACKS,-(sp)
          move.w  #133,-(sp)
          trap    #14
          addq.l  #4,sp

  Return: The driver always returns E_OK (0).

*************************************************************************
				Setmontracks
*************************************************************************

  Opcode:
       XBIOS 134

  Syntax:
       long Setmontracks ( word MONTRACK );

  Description:
          Setmontracks() select the nonitor track (0-3).
          Actually the driver always uses this track.

  Binding:
          move.w  MONTRACK,-(sp)
          move.w  #134,-(sp)
          trap    #14
          addq.l  #2,sp

  Return: The driver always returns E_OK (0).

*************************************************************************
				Setinterrupt
*************************************************************************

  Opcode:
      XBIOS 135

  Syntax:
      long Setinterrupt  ( word SRC_INTER, word CAUSE );
      long NSetinterrupt ( word SCR_INTER, word CAUSE, long INTH_ADDR );

  Description:
          This function was designed especially for the Falcon, which had the 
          "End of Frame" interrupts on Timer A or MFP's gpip 7, but the driver
          emulates timer A in Event Count Mode and MFP's gpip 7. You must use
          Jdisint(), Jenabint(), and Xbtimer() for timer A. The new solution 
          is to use the new GSXB function with SRC_INTER = 2, this new mode 
          means "install user End-Of-Frame interrupt function".    

  SRC_INTER:
  CAUSE:  These values keep the original meanings, such as :

          SCR_INTER CAUSE Meaning
            value   value   
              0       0   Disable interrupt
              0       1   Vector timer A (0x134) called on eof DAC interrupts
              0       2   Vector timer A (0x134) called on eof ADC interrupts
              0       3   Vector timer A (0x134) called on both DAC/ADC interrupts
              1       0   Disable interrupt
              1       1   Vector MFP's gpip 7 (0x13c) called on eof DAC interrupts
              1       2   Vector MFP's gpip 7 (0x13c) called on eof ADC interrupts
              1       3   Vector MFP's gpip 7 (0x13c) called on both DAC/ADC interrupts

          SCR_INTER = 2 is a GSXB only mode, and is is available when bits 2 
          AND 5 in _SND cookie is SET, and the cookie GSXB.
                        
          SCR_INTER CAUSE Meaning
            value   value    
              2       0   Disable interrupt
              2       1   INTH_ADDR called on eof DAC interrupts
              2       2   INTH_ADDR called on eof ADC interrupts
              2       3   INTH_ADDR called on both DAC/ADC eof interrupts

  INTH_ADDR:
          This is a pointer to a small routine that is called by the 
          drivers interrupt routine on End-Of-Frame (eof) interrupts. I 
          refer to the playback/capture buffer set by Setbuffrt() as a 
          'frame' from now on. This routine is called in Supervisor mode, 
          and should end with a RTS. The driver will pass some 
          information to the function in CPU register D0. The bits in D0 
          are as follows on entry to the user interrupt function;

          Bit 0 - If cleared, playback/capture just stopped. This means 
                  that the frame is played if playback, or has been 
                  filled if capture. If set, however, it means that 
                  playback or capture just started over, either on a next 
                  frame if double buffering is being used, or just looped 
                  to the start of the frame.

          Bit 1 - This is a loop flag. If this bit is cleared and Bit 0 
                  is set, playback/capture will stop when this frame is 
                  played through(DAC) or filled up(ADC). If set, however, 
                  playback/capture will either revert to the beginning of 
                  the frame, or swap to the second frame if double 
                  buffering is used. This flag can be changed during 
                  playback/capture using Buffoper().

          Bit 7 - This bit indicates wether it is the DAC (cleared) or 
                  ADC (set) eof that generated this interrupt. This is 
                  handy when one use the same user interrup function to 
                  handle both playback and capture eof's.(CAUSE = 3)

          The remaining bits in D0 are always cleared.

  Binding:
          move.w  CAUSE,-(sp)
          move.w  SRC_INTER,-(sp)
          move.w  #135,-(sp)
          trap    #14
          addq.l  #6,sp  
  
          Or the GSXB new mode :
          
          pea     INTH_ADDR
          move.w  CAUSE,-(sp)
          move.w  SRC_INTER,-(sp)   * Must be 2!! *
          move.w  #135,-(sp)
          trap    #14
          lea     10(sp),sp

  Return: Setinterrupt() or NSetinterrupt() will return E_OK (0) if successful.

*************************************************************************
				Buffoper
*************************************************************************

  Opcode:
      XBIOS 136

  Syntax:
      long Buffoper ( word Mode );

  Description:
          Buffoper() is the function used to start/stop playback or 
          capture. After setting up the necessary paramters, this 
          function is called to start the operation.

  Mode:
          If Mode = SND_INQUIRE (-1), the current operation is 
          returned. Otherwise, Mode is bitmask which selects the desired 
          operation as follows;

          Bit 0 - If set, start playback. If cleared, stop playback.
          Bit 1 - If set, enable looping for playback. If cleared, 
                  playback stops at End Of Frame.

          Bit 2 - If set, start capture. If cleared, stop capture.
          Bit 3 - If set, enable looping for capture. If cleared, capture 
                  will stops at End Of Frame.


  NOTE:   One can turn on/off looping flag for either playback/capture 
          during operation. To do that, call Buffoper(SND_INQUIRE) and 
          change only Bit 1 for playback and/or Bit 3 for capture to the 
          desired loop mode and call Buffoper() again with the new 
          setting. Calling Buffoper() with Bit 0/2 set, will not restart 
          playback/capture if already started.

  Binding:
          move.w  Mode,-(sp)
          move.w  #136,-(sp)
          trap    #14
          addq.l  #4,sp

  Return:
          Buffoper() returns E_OK (0) if successful. 

*************************************************************************
				Dsptristate 
*************************************************************************

  Opcode:
      XBIOS 137

  Syntax:
      long Dsptristate ( word DSPXMIT, word DSPREC );

  Description:
          Like GSXB, Dsptristate() is not implemented, and always
          returns E_OK :


  Binding:
          move.w DSPREC,-(sp)
          move.w DSPXMIT,-(sp)
          move.w #137,-(sp)
          trap   #14
          addq.l #6,sp

  Return: Dsptristate() always returns E_OK (0).

*************************************************************************
				Gpio
*************************************************************************

  Opcode:
      XBIOS 138

  Syntax:
      long Gpio ( word Mode, word DATA );

  Description:
          Gpio() is used to read the gpio pins of the DSP's connector.
          In the other cases, this function always return E_OK (0).

          Like the MilanBlaster sound driver and the Falcon FDI, Gpio is
          used for selection of external clock (see Devconnect()).

  Mode:   Mode selects what operation to do as follows :

          Mode     Meaning of DATA
           0       Set bits in DATA will make the corresponding gpio bit 
                   output.
           1       Read gpio status, DATA is ignored.
           2       Write to gpio as given in DATA.


  Binding:
  	       move.w  DATA,-(sp)
  	       move.w  Mode,-(sp)
  	       move.w  #138,-(sp)
  	       trap    #14
  	       addq    #6,sp

  Return: Gpio() will return a E_OK (0) if successful, except when Mode 1,
          in which case the read read gpio bits are returned.

*************************************************************************
				Devconnect
*************************************************************************

  Opcode:
      XBIOS 139

  Syntax:
      long Devconnect ( word SRC, word DST, word CLK, word PRESCALE, word 
                        PROT );

  Description:
          Devconnect() attatches a source device in the sound system to 
          one or multiple destination devices through the use of the 
          connection matrix.

          Devconnect() implementation in the driver is limited because the
          matrix not exists under Mac. At this time, SRC and CLK are just 
          tested, and PRESCALE and CLK are used. 


 SRC:     SRC selects the source device to connect as follows :

          Name    Source  Meaning

          DMAPLAY   0     DMA playback
          DSPXMIT   1     DSP Transmit
          EXTINP    2     External Input
          ADC       3     Microphone/Yamaha

 DST:     DST is a bitmask indicating which device(s) will get input from 
          SRC as follows :

          Name     Mask   Meaning

          DMAREC   0x01   DMA Capture
          DSPRECV  0x02   DSP Receive
          EXTOUT   0x04   External Out
          DAC      0x08   DAC

  CLK:    CLK is the clock the source device will use.

          Name    CLK   Meaning
          CLK_25M  0     Internal 25.175 Mhz clock.
          CLK_EXT  1     External clock.
                         Like the MilanBlaster this clock depend with 
                         selection of bit 0 of Gpio (0: 22.5792MHz 
                         1: 24,576 MHz). The driver will install a 
                         decent clockvalue here, so that sample rates 
                         calculated with Devconnect() will come as 
                         close to the wanted/hardware supprted rates
                         as possible.
          CLK_32M  2     Internal 32 Mhz clock.
                         Not used by the driver and returns ENODEV.

  PRESCALE:
          PRESCALE chooses the SRC clock prescaler. Sample rate is 
          determined as follows:

                               clockrate/256
                  samplerate = -------------
                                prescale - 1

          When PRESCALE has a value of CLK_COMPAT (0), the value set by 
          Soundcmd(SETPRESCALE) is used to set the desired sample rate. 
          (See Soundcmd()). Here is a table of PRESCALE values :
 
                              CLK=0     CLK=1 &    CLK=1 &
                                        Gpio(2,0)  Gpio(2,1)
          Name      Prescale  25.175MHz 22.5792MHz 24,576 MHz
          CLK_COMPAT    0     TT030/STe compatibility mode. Use 
                               prescale value set by Soundcmd(SETPRESCALE)
          CLK_50K       1     59170 Hz  44100 Hz   48000 Hz
          CLK_33K       2     32880 Hz  29400 Hz   32000 Hz
          CLK_25K       3     24585 Hz  22050 Hz   24000 Hz
          CLK_20K       4     19668 Hz  17640 Hz   19200 Hz
          CLK_16K       5     16390 Hz  14700 Hz   16000 Hz
          CLK_12K       7     12292 Hz  11025 Hz   12000 Hz
          CLK_10K       8      9834 Hz   8820 Hz    9600 Hz
          CLK_8K       11      8195 Hz   7350 Hz    8000 Hz

  PROT:   PROT sets the handshaking mode for DSP<->Codec transfers, and 
          is ignored by the driver. A value of 0 enables handshaking, a
          value of 1 disables it.

  NOTE:   The sample rate is set for both DAC/ADC by Devconnect().

  Binding:
          move.w PROT,-(sp)
          move.w PRESCALE,-(sp)
          move.w CLK,-(sp)
          move.w DST,-(sp)
          move.w SRC,-(sp)
          move.w #139,-(sp)
          trap   #14
          lea    12(sp),sp


  Return: Devconnect() returns E_OK (0) if successful.

*************************************************************************
				Sndstatus
*************************************************************************

  Opcode:
      XBIOS 140

  Syntax:
      long Sndstatus ( word Mode );

  Description:
          Sndstatus() is originally used to either reset the sound system 
          or get some status information about it. Like GSXB the driver 
          adds a lot to this function. Audio application authors are 
          strongly adviced to use use this Sndstatus() to obtain 
          information about the currenlty installed driver, such as sample
          formats, etc...

  Mode:
          Mode   Meaning

            0    Originally this mode (called reset elsewhere) returned 
                 status about the soundsystem.
                 The driver always returns 0.

            1    This mode reset the soundsystem.

          If both bits 2 AND bit 5 in _SND cookie is set, these 
          additional modes are awailable, under both GSXB and 
          MilanBlaster.

            2    Query supported sample resolutions. This will return a 
                 bitmask of available sample resolutions the current 
                 driver supports. The meaning of the bitmask is defined 
                 as follows - a SET bit means the corresponding 
                 resolution is supported:

                 Bit 0 - 8-bit  samples supported
                 Bit 1 - 16-bit samples supported
                 Bit 2 - 24-bit samples supported
                 Bit 3 - 32-bit samples supported
                 
                 The driver always returns 3 (8 & 16 bits).      

            3    Query available mixer lines. This mode will return a 
                 bitmask of available Mixer elements, or attenuation/gain 
                 controls. A SET bit means the element is available :

                 Bit 0 - Record Gain (ADC)
                 Bit 1 - PCM attenuation (DAC)
                 Bit 2 - Mic attenuation
                 Bit 3 - FM Generator attenuation
                 Bit 4 - Line In attenuation
                 Bit 5 - CD In attenuation
                 Bit 6 - Video/TV In attenuation
                 Bit 7 - Aux1 attenuation

                 The driver always returns 3 (ADC & DAC).                 

            4    Query available record sources. This mode will return a 
                 bitmask of available record sources. A SET bit means the 
                 source is available as a record source.
                 The driver returns always 0.

            5    Query duplex capability. Use this Mode to determine 
                 whether or not the current driver (and hardware) 
                 supports full duplex (1) or not (0).
                 The driver returns always 0.

            8    Query 8-bit sample formats supported. This mode will 
                 return a bitmask of currently supported 8-bit sample 
                 formats. A SET bit means that the format is supported in 
                 hardware, as follows :

                 Bit 0 - Signed
                 Bit 1 - Unsigned

                 The driver always returns 1 (Signed).

            9    Query 16-bit sample formats supported. This mode will 
                 return a bitmask of currently supported 16-bit sample 
                 formats. A SET bit means that the format is supported in 
                 hardware, as follows :

                 Bit 0 - Signed
                 Bit 1 - Unsigned
                 Bit 2 - Big endian (Motorola byte order)
                 Bit 3 - Little endian (Intel byte order)

                 The driver always returns 5 (Signed Big endian).

           10   Query 24-bit sample formats supported. This mode will 
                 return a bitmask of currently supported 24-bit sample 
                 formats. A SET bit means that the format is supported in 
                 hardware, as follows :

                 Bit 0 - Signed
                 Bit 1 - Unsigned
                 Bit 2 - Big endian (Motorola byte order)
                 Bit 3 - Little endian (Intel byte order)

                 The driver not support 24-bit sample-resolution and 
                 return ENODEV.

            11   Query 32-bit sample formats supported. This mode will 
                 return a bitmask of currently supported 32-bit sample 
                 formats. A SET bit means that the format is supported in 
                 hardware, as follows :

                 Bit 0 - Signed
                 Bit 1 - Unsigned
                 Bit 2 - Big endian (Motorola byte order)
                 Bit 3 - Little endian (Intel byte order)

                 The driver not support 32-bit sample-resolution and 
                 returns ENODEV.

  Binding:
          move.w Mode,-(sp)
          move.w #140,-(sp)
          trap   #14
          addq.l #4,sp
          
  Return: The return by Sndstatus depends on the Mode used.
  
*************************************************************************
				Buffptr
*************************************************************************

  Opcode:
      XBIOS 141

  Syntax:
      long Buffptr ( long *PTR );

  Description:
          Buffptr() returns the current position of the playback and 
          capture pointers.

  PTR:    PTR is a pointer to a structure that is filled in with the 
          current position of the Playback (DAC) and capture (ADC) 
          pointers. The structure looks like this :

          typedef struct
          {
          void *playback_pos
          void *capture_pos
          long reserved1
          long reserved2
          } SBUFPTR;

  Binding:
          pea	  PTR
          move.w  #141,-(sp)
          trap    #14
          addq.l  #6,sp

  Return: Buffptr() returns always E_OK (0).

*************************************************************************
